package com.example.love.mapper;
import com.example.entity.User;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


//@Mapper 在接口的上加入了注入接口  不需要在启动类MapperScan 扫描包
public interface UserMappers {
    @Select("Select * from t_user where  username =#{name}")
    User findByName(@Param("")String name);
    @Insert("Insert   user (name,age) values (#{name},#{age}) ")
    Integer insert(@Param("name")String name,@Param("age") Integer age);
}
